import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [{
        path: '/home',
        name: 'Home',
        component: () =>
            import ('../views/Home.vue'),
        children: [{
                path: 'homeTabA',
                name: 'homeTabA',
                component: () =>
                    import ('@/components/Home/HomeTab/HomeTabA.vue'),
            },
            {
                path: 'homeTabB',
                name: 'homeTabB',
                component: () =>
                    import ('@/components/Home/HomeTab/HomeTabB.vue'),
            },
            {
                path: 'homeTabC',
                name: 'homeTabC',
                component: () =>
                    import ('@/components/Home/HomeTab/HomeTabC.vue'),
            },
            {
                path: 'homeTabD',
                name: 'homeTabD',
                component: () =>
                    import ('@/components/Home/HomeTab/HomeTabD.vue'),
            }
        ]
    },
    {
        path: '/search',
        name: 'Search',
        component: () =>
            import ('../views/Search.vue')
    },
    {
        path: '/Sort',
        name: 'Sort',
        component: () =>
            import ('../views/Sort.vue'),
        children: [{
                path: "/era",
                name: "era",
                component: () =>
                    import ('com/Sort/twolvyou/era.vue'),
            },
            {
                path: "/erb",
                name: "erb",
                component: () =>
                    import ('com/Sort//twolvyou/erb.vue'),
            },
            {
                path: "/erc",
                name: "erc",
                component: () =>
                    import ('com/Sort//twolvyou/erc.vue'),
            },
        ]

    },
    {
        path: '/hyperBox',
        name: 'HyperBox',
        component: () =>
            import ('../views/HyperBox.vue')
    },
    {
        path: '/banner',
        name: 'Banner',
        component: () =>
            import ('../views/Banner.vue')
    },
    {
        path: '/sortAll',
        name: 'SortAll',
        component: () =>
            import ('../views/SortAll.vue')
    },
    {
        path: '/hotList',
        name: 'HotList',
        component: () =>
            import ('../views/HotList.vue')
    },
    {
        path: '/details',
        name: 'Details',
        component: () =>
            import ('../views/Details.vue')
    },
    {
        path: '/smallTown',
        name: 'SmallTown',
        component: () =>

            import ('../views/SmallTown.vue'),


    },

    {
        path: '/smalla',
        name: 'Smalla',
        component: () =>
            import ('@/views/SmallTown/smalla.vue')
    },
    {
        path: '/smallb',
        name: 'Smallb',
        component: () =>
            import ('@/views/SmallTown/smallb.vue'),
        //2级路由
        children: [{
                path: '/eraa',
                name: 'era',
                component: () =>
                    import ('@/views/SmallTown/er/eraa.vue'),
            },
            {
                path: '/erbb',
                name: 'era',
                component: () =>
                    import ('@/views/SmallTown/er/erbb.vue'),
            },
        ]

    },
    {
        path: '/smallc',
        name: 'Smallc',
        component: () =>
            import ('@/views/SmallTown/smallc.vue')
    },
    {
        path: '/smalld',
        name: 'Smalld',
        component: () =>
            import ('@/views/SmallTown/smalld.vue')
    },


    {
        path: '/life',
        name: 'Life',
        component: () =>
            import ('../views/Life.vue'),
        // 2级路由
        children: [{
                path: 'advice',
                name: 'Advice',
                component: () =>
                    import ('../views/Lifeitem/Advice.vue')
            },
            {
                path: 'follow',
                name: 'Follow',
                component: () =>
                    import ('../views/Lifeitem/Follow.vue')
            },
            {
                path: 'food',
                name: 'Food',
                component: () =>
                    import ('../views/Lifeitem/Food.vue')
            },
            {
                path: 'hotfood',
                name: 'Hotfood',
                component: () =>
                    import ('../views/Lifeitem/Hotfood.vue')
            }
        ]
    },
    {
        path: '/overlord',
        name: 'Overlord',
        component: () =>
            import ('../views/Lifeitem/Overlord.vue')

    },
    {
        path: '/shop',
        name: 'Shop',
        component: () =>

            import ('../views/Shop.vue'),
    },
    {
        path: "/erz",
        name: "erz",
        component: () =>
            import ('../views/ER/ERa.vue'),
    },
    {
        path: "/ery",
        name: "ery",
        component: () =>
            import ('../views/ER/ERb.vue'),
    },
    {
        path: '/mine',
        name: 'Mine',
        component: () =>
            import ('../views/Mine.vue')

    },
    {
        path: '/set',
        name: 'Set',
        component: () =>
            import ('../views/Mine/set.vue')
    },
    {
        path: '/loginnest',
        name: 'Loginnest',
        component: () =>
            import ('../components/login/loginnest.vue')
    },
    {
        path: '/regist',
        name: 'Regist',
        component: () =>
            import ('../components/login/regist.vue')
    },
    {
        path: '/pmi',
        name: 'Pmi',
        component: () =>
            import ('../views/Mine/pmi.vue')
    },
    {
        path: '/doorshop',
        name: 'Doorshop',
        component: () =>
            import ('../views/Mine/doorshop.vue')
    },
    {
        path: '/allorder',
        name: 'Allorder',
        component: () =>
            import ('../views/Mine/allorder.vue'),

        children: [{
                path: 'allclassify',
                name: 'Allclassify',
                component: () =>
                    import ('../views/Mine/allorder/allclassify.vue')
            },
            {
                path: 'dropshipping',
                name: 'Dropshipping',
                component: () =>
                    import ('../views/Mine/allorder/dropshipping.vue')
            },
            {
                path: 'obligation',
                name: 'Obligation',
                component: () =>
                    import ('../views/Mine/allorder/obligation.vue')
            },
            {
                path: 'receiving',
                name: 'Receiving',
                component: () =>
                    import ('../views/Mine/allorder/receiving.vue')
            },
            {
                path: 'remain',
                name: 'Remain',
                component: () =>
                    import ('../views/Mine/allorder/remain.vue')
            },
        ]
    },
    {
        path: '/vip',
        name: 'Vip',
        component: () =>
            import ('../views/Mine/vip.vue')
    },
    {
        path: '/gift',
        name: 'Gift',
        component: () =>
            import ('../views/Mine/gift.vue')
    },
    {
        path: '/refill',
        name: 'Refill',
        component: () =>
            import ('../views/Mine/refill.vue')
    },
    {
        path: '/site',
        name: 'Site',
        component: () =>
            import ('../views/Mine/site.vue')
    },
    {
        path: '/newsite',
        name: 'Newsite',
        component: () =>
            import ('../views/Mine/newsite.vue')
    },
    {
        path: '/shoucang',
        name: 'Shoucang',
        component: () =>
            import ('../views/Mine/shoucang.vue')
    },
    {
        path: '/redbao',
        name: 'Redbao',
        component: () =>
            import ('../views/Mine/redbao.vue')
    },
    {
        path: '/okorder/:order',
        name: 'Okorder',
        component: () =>
            import ('../views/Mine/okorder.vue')
    },
    {
        path: '/headp',
        name: 'Headp',
        component: () =>
            import ('../views/Mine/headp.vue'),
        children: [{
                path: 'works',
                name: 'Works',
                component: () =>
                    import ('../views/Mine/zpzb/works.vue')
            },
            {
                path: 'collect',
                name: 'Collect',
                component: () =>
                    import ('../views/Mine/zpzb/collect.vue')
            },
            {
                path: 'praise',
                name: 'Praise',
                component: () =>
                    import ('../views/Mine/zpzb/praise.vue')
            },
            {
                path: 'apply',
                name: 'Apply',
                component: () =>
                    import ('../views/Mine/zpzb/apply.vue')
            },
        ]

    },
    {
        path: '/login',
        name: 'Login',
        component: () =>
            import ('../views/Login.vue')

    },
    {
        path: '/Landao',
        name: 'landao',
        component: () =>
            import ('../views/LanDao.vue')
    },
    {
        path: '/Act',
        name: 'Act',
        component: () =>
            import ('../views/Activity.vue')

    },
    {
        path: '/',
        redirect: '/home/homeTabA'
    },
    {
        path: '/det-xiangqing',
        name: 'Det-xiangqing',
        component: () =>
            import ('../views/det-xiangqing.vue')
    },
    {
        path: '/det-tuijian',
        name: 'Det-tuijian',
        component: () =>
            import ('../views/det-tuijian.vue')
    },

    {
        path: '/det-dapei',
        name: 'Det-dapei',
        component: () =>
            import ('../views/det-dapei.vue')
    },
    {
        path: '/det-pinglun',
        name: 'Pinglun',
        component: () =>
            import ('../views/det-pinglun.vue'),
        children: [{
                path: 'era',
                name: 'Era',
                component: () =>
                    import ('../views/detaer/era')
            },
            {
                path: 'erb',
                name: 'Erb',
                component: () =>
                    import ('../views/detaer/erb')
            },
            {
                path: '/',
                redirect: "era"
            }
        ]
    },

    {
        path: '/*',
        name: 'No',
        component: () =>
            import ('../views/No.vue')
    },
]

const router = new VueRouter({
    base: process.env.BASE_URL,
    routes
});

export default router

